<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>学无止境</title>
<script src="jquery.min.js"></script>
<script src="knob.js"></script>

<script>
    $('.dial').trigger(
        'configure',
        {
            "min":0,
            "max":100,
            "width":150,
    	    "fgColor":"#ffec03",
    	    "skin":"tron",
    	    "thickness":0.2,
    	    "displayPrevious":true,
            "cursor":true
        }
    );
</script>
</head>
<body>
<center>
<a href="https://gitee.com/iron2222/esp8266" target="_blank"><img src="/img/lalala.png" alt="iron2222"></a>
<h1>以下旋钮可控制ESP8266开发板LED亮度</h1>
<input type="text" class="dial" value="75" data-displayPrevious=true data-fgColor="#00A8A9" data-thickness=.3 value="29">

<script>
    $(".dial").knob({
        'change' : function (v) { console.log(Math.round(v,0));    
		$.ajax({url: "/setLED?pwm="+Math.round(v,0), success: function(result){
        		$("#div1").html(result);
    		}});
	}
    });
	

</script>
<p style="text-align: center">此页面用于演示如何通过网页控制ESP8266引脚的PWM数值。</p>
<p style="text-align: center">gitee网址： <a href="https://gitee.com/iron2222/esp8266" target="_blank">gitee.com/iron2222/esp8266</a></p>
</center>
</body>
</html>

